(function(win){
	
	function Super(){
		this.name = arguments[0];
	}

	Super.prototype ={
		'say' : function(){
			console.log('super say', this.name);
		}
	};

	function Sub(){
		Super.call(this, this.name = arguments[0]);
		this.age = this.name = arguments[1];;
	}

	Sub.prototype = new Super();

	Sub.prototype.eat = function(){
		console.log('i am eating');
	};

	Sub.prototype.say = function(){
		console.log('sub say', this.name);
	};

	var sup = new Super('jim');
	var sub = new Sub('tom', 23);


	sup.say();
	sub.say();
	sub.eat();

})(window);

/*
		switch(typeof self.tmpl){
			case 'object':
				if(self.tmpl.html){
					self._parse(self.tmpl.html());
				}else{
					console.error('invalid tmpl object.');
				}
				break;
			case 'string':
				if(/^http\:\/\/.*$/.test(self.tmpl)) {
					$.ajax({
						'url': self.tmpl,
						'dataType': 'html',
						'success': function(html) {
							self._parse(html);
						},
						'error': function() {
							Z.alert('load tmpl failed.');
						}
					});
				} else if (!/\W/.test(self.tmpl)) {
					self._parse('<div>' + self.tmpl + '</div>');
				} else {
					self._parse(self.tmpl);
				}
				break;
			default:
				console.error('invalid tmpl type.');
				break;
		}*/